package com.baiyang.generator.conf;

import com.baiyang.generator.utils.StringUtil;

public class Configuration {
	/** 项目路径 **/
	private String projectPath ;
	/** 基础包名 **/
	private String packageProject ;
	/** mapper存储路径 **/
	private String pathMapper ;
	
	
	/** 实体类包名 **/
	private String packageEntity = "model";
	/** 数据库包名 **/
	private String packageDao = "dao";
	/** 控制层包名 **/
	private String packageController = "control";
	/** 服务层包名 **/
	private String packageInterface = "service";
	/** 服务层实现类包名 **/
	private String packageService = "impl";
	
	public void setData(String tableName,String tableRemark) {
		this.tableName = tableName;
		this.tableRemark = tableRemark;
		this.tableAlias = tableName.substring(0, 1).toLowerCase();
		this.entityClass = StringUtil.tableName2ClassName(tableName);
		this.entityName = StringUtil.firstToLowerCase(entityClass);
		this.serviceClass = entityClass + "ServiceImpl";
		this.serviceName = entityName + "ServiceImpl";
		this.interfaceClass = entityClass + "Service";
		this.interfaceName = entityName + "Service";
		this.daoClass = entityClass + "Dao";
		this.daoName = entityName + "Dao";
		this.mapperName = entityClass + "Mapper";
		this.controlClass = entityClass + "Con";
		this.controlName = entityName + "Con";
	}
	/** 表名 **/
	private String tableName = "";
	/** 表的别名 **/
	private String tableAlias = "";
	/** 表注解 **/
	private String tableRemark = "";
	/** 控制器类名 **/
	private String controlClass = "";
	/** 控制器对象名 **/
	private String controlName = "";
	/** 实体类名 **/
	private String entityClass = "";
	/** 实体类对象名 **/
	private String entityName = "";
	/** 服务类名 **/
	private String serviceClass = "";
	/** 服务类对面名 **/
	private String serviceName = "";
	/** 接口类名 **/
	private String interfaceClass = "";
	/** 接口对象名 **/
	private String interfaceName = "";
	/** dao类名 **/
	private String daoClass = "";
	/** dao对象名 **/
	private String daoName = "";
	/** mapper.xml文件名 **/
	private String mapperName = "";

	public String getTableName() {
		return tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	public String getEntityClass() {
		return entityClass;
	}

	public void setEntityClass(String entityClass) {
		this.entityClass = entityClass;
	}

	public String getEntityName() {
		return entityName;
	}

	public void setEntityName(String entityName) {
		this.entityName = entityName;
	}

	public String getServiceClass() {
		return serviceClass;
	}

	public void setServiceClass(String serviceClass) {
		this.serviceClass = serviceClass;
	}

	public String getServiceName() {
		return serviceName;
	}

	public void setServiceName(String serviceName) {
		this.serviceName = serviceName;
	}

	public String getDaoClass() {
		return daoClass;
	}

	public void setDaoClass(String daoClass) {
		this.daoClass = daoClass;
	}

	public String getDaoName() {
		return daoName;
	}

	public void setDaoName(String daoName) {
		this.daoName = daoName;
	}

	public String getMapperName() {
		return mapperName;
	}

	public void setMapperName(String mapperName) {
		this.mapperName = mapperName;
	}

	public String getProjectPath() {
		return projectPath;
	}

	public void setProjectPath(String projectPath) {
		this.projectPath = projectPath;
	}

	public String getPackageProject() {
		return packageProject;
	}

	public void setPackageProject(String packageProject) {
		this.packageProject = packageProject;
	}

	public String getPackageEntity() {
		return packageEntity;
	}

	public void setPackageEntity(String packageEntity) {
		this.packageEntity = packageEntity;
	}

	public String getPackageDao() {
		return packageDao;
	}

	public void setPackageDao(String packageDao) {
		this.packageDao = packageDao;
	}

	public String getPathMapper() {
		return pathMapper;
	}

	public void setPathMapper(String pathMapper) {
		this.pathMapper = pathMapper;
	}

	public String getPackageController() {
		return packageController;
	}

	public void setPackageController(String packageController) {
		this.packageController = packageController;
	}

	public String getPackageInterface() {
		return packageInterface;
	}

	public void setPackageInterface(String packageInterface) {
		this.packageInterface = packageInterface;
	}

	public String getPackageService() {
		return packageService;
	}

	public void setPackageService(String packageService) {
		this.packageService = packageService;
	}

	public String getInterfaceName() {
		return interfaceName;
	}

	public void setInterfaceName(String interfaceName) {
		this.interfaceName = interfaceName;
	}

	public String getInterfaceClass() {
		return interfaceClass;
	}

	public void setInterfaceClass(String interfaceClass) {
		this.interfaceClass = interfaceClass;
	}

	public String getTableRemark() {
		return tableRemark;
	}

	public void setTableRemark(String tableRemark) {
		this.tableRemark = tableRemark;
	}

	public String getTableAlias() {
		return tableAlias;
	}

	public void setTableAlias(String tableAlias) {
		this.tableAlias = tableAlias;
	}

	public String getControlClass() {
		return controlClass;
	}

	public void setControlClass(String controlClass) {
		this.controlClass = controlClass;
	}

	public String getControlName() {
		return controlName;
	}

	public void setControlName(String controlName) {
		this.controlName = controlName;
	}
}
